package com.ls.modules.enumconstant;

public enum Season {
//    SPRING,SUMMER,FALL,WINTER;

    SPRING(0,"SPRING","SPRING"),
    SUMMER(1,"SPRING","SPRING"),
    FALL(2,"SPRING","SPRING"),
    WINTER(3,"SPRING","SPRING");
    private int code;
    private String name;
    private String value;


    Season(int code,String name,String value){
        this.code = code;
        this.name = name;
        this.value = value;
    }

    public static Season getSeason(int code){
        for (Season eachState : values()) {
            if(code == eachState.code){
                return eachState;
            }
        }
        return WINTER;
    }
}

